package cn.dnui_cr503.dnuifood_16110100503.model;

import cn.dnui_cr503.dnuifood_16110100503.iface.Searchiface;
import cn.dnui_cr503.dnuifood_16110100503.listener.OnRetrofitListener;
import cn.dnui_cr503.dnuifood_16110100503.service.SearchService;
import retrofit2.Call;

/**
 * Created by chengrui on 2018/12/4.
 */

public class SearchModel extends BaseModel implements Searchiface {
    private SearchService service;

    public SearchModel(){
        super();
        service = retrofit.create(SearchService.class);
    }
    @Override
    public void getFoodBySearch(String search, OnRetrofitListener listener) {
        Call call =service.getFoodBySearch(search);
        bindCallback(call,listener,1);
    }
}
